<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="app">

        <div v-if="isuser">
        <span>用户账号：</span>
        <input type="text" placeholder="用户账号" key="username">
        </div>
        
        <div v-else>
        <span>用户邮箱：</span>
        <input type="text"placeholder="用户邮箱" key="ueseemal">
        </div>

        <button @click="switchuser()">切换用户类型</button>
        
    </div>
        <script src="vue.js"></script>
        <script>
            app = new Vue({
                el: '#app',
                data:{
                    isuser: true
                },
                methods:{
                    switchuser(){
                        this.isuser=!this.isuser
                    }
                }
            })
        </script>

</body>
</html>